<template>
  <div class="tool-core-features">
    <h2 class="bar-title mb-6 break-words text-center">
      <span class="text-gray-1000 text-26 font-semibold break-words w-full">
        {{$t('detail_corefeatures',{toolName: toolName})}}
      </span>
    </h2>
    <div class="grid sm:grid-cols-2 gap-x-10 gap-y-9 mt-8 max-w-3xl mx-auto">
      <div :params="{handle:item.handle }"
        v-for="(item, key) in core_features"
        :key="`case-${key}`"
        class="flex items-start">
        <svg-icon className="w-6 h-6 mr-3 flex-shrink-0"
          iconName='check_3'></svg-icon>
        <div class="text-22 leading-7 text-gray-1000 flex-1 break-words w-0">{{item}}</div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'ToolDetailCoreFeatures',
  props: {
    tool: {
      type: Object,
      default: function () {
        return {}
      },
    },
    core_features: {
      type: Array,
      default: () => [],
    },
    toolName: {
      type: String,
      default: '',
    },
  },
  computed: {
    ...mapState({
      locale: (state) => state.locale,
    }),
  },
  methods: {
    getLocaleText(val, val_locales) {
      if (
        Object.prototype.toString.call(val_locales) === '[object Object]' &&
        typeof val_locales[this.locale] != 'undefined' &&
        val_locales[this.locale] !== null &&
        val_locales[this.locale] !== ''
      ) {
        return val_locales[this.locale]
      } else {
        return val
      }
    },
  },
}
</script>
<style lang='scss' scoped>
.tool-core-features {
  .case-list {
    .case-item {
      position: relative;
    }
  }
}
</style>